﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Taobao.Tools2.Domain.EntityFramework.Mappings;

namespace Taobao.Tools2.Domain.EntityFramework
{
    public class OrderInfoMapping:ModelMapping<OrderInfo>
    {
        public OrderInfoMapping()
            : base()
        {
            Map(d => d.ToTable("OrderInfo"));
            Property(c => c.Title).HasColumnName("Title");
            Property(c => c.Price).HasColumnName("Price");
            Property(c => c.Number).HasColumnName("Number");
            Property(c => c.OuterIID).HasColumnName("OuterIId");
            Property(c => c.IID).HasColumnName("Iid");
            Property(c => c.SkuPropertiesName).HasColumnName("SkuPropertiesName");
            Property(c => c.ItemMealName).HasColumnName("ItemMealName");
            Property(c => c.NumIID).HasColumnName("NumIid");
            Property(c => c.SkuID).HasColumnName("SkuID");
            Property(c => c.DiscountFee).HasColumnName("Discount_fee");
            Property(c => c.AdjustFee).HasColumnName("Adjust_fee");
            Property(c => c.Payment).HasColumnName("payment");
            Property(c => c.Status).HasColumnName("status");
            Property(c => c.Modified).HasColumnName("Modified");
            Property(c => c.TaobaoOID).HasColumnName("TaobaoOID");

            Property(c => c.ID).HasColumnName("OrderID").HasDatabaseGeneratedOption(System.ComponentModel.DataAnnotations.DatabaseGeneratedOption.Identity) ;
            HasKey(c => c.ID);

            Property(c => c.ShopID).HasColumnName("shop");
            Property(c => c.RefundID).HasColumnName("refundID");
            Property(c => c.TradeID).HasColumnName("Trade");
        }
    }
}
